import 'package:aweb5/bean/aplus/follow_list_entity.dart';

followListEntityFromJson(FollowListEntity data, Map<String, dynamic> json) {
	if (json['msg'] != null) {
		data.msg = json['msg']?.toString();
	}
	if (json['data'] != null) {
		data.data = new List<FollowListData>();
		(json['data'] as List).forEach((v) {
			data.data.add(new FollowListData().fromJson(v));
		});
	}
	if (json['code'] != null) {
		data.code = json['code']?.toInt();
	}
	return data;
}

Map<String, dynamic> followListEntityToJson(FollowListEntity entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['msg'] = entity.msg;
	if (entity.data != null) {
		data['data'] =  entity.data.map((v) => v.toJson()).toList();
	}
	data['code'] = entity.code;
	return data;
}

followListDataFromJson(FollowListData data, Map<String, dynamic> json) {
	if (json['headimgurl'] != null) {
		data.headimgurl = json['headimgurl']?.toString();
	}
	if (json['desc'] != null) {
		data.desc = json['desc']?.toString();
	}
	if (json['name'] != null) {
		data.name = json['name']?.toString();
	}
	if (json['member_id'] != null) {
		data.memberId = json['member_id']?.toInt();
	}
	return data;
}

Map<String, dynamic> followListDataToJson(FollowListData entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['headimgurl'] = entity.headimgurl;
	data['desc'] = entity.desc;
	data['name'] = entity.name;
	data['member_id'] = entity.memberId;
	return data;
}